package org.tity.sql.code.modules.testnewstity.service.impl;

import org.tity.backends.system.data.service.ListDataService;
import org.tity.sql.code.entity.test.TestNewsTity;
import org.springframework.beans.factory.annotation.Autowired;
import org.tity.sql.code.entity.test.TestNewsTitySet;
import org.tity.sql.code.modules.testnewstity.service.TestNewsTityService;
import org.springframework.stereotype.Service;
import org.tity.sql.sql.builder.CE;
import org.tity.sql.dao.DAO;
import org.tity.ends.spring.SpringUtil;


/**
 * [ test_news_tity ] 服务实现
 * @author 李方捷
 * @date 2020-03-26 14:12:33
 **/
@Service
public class TestNewsTityServiceImpl extends ListDataService<TestNewsTity,TestNewsTitySet> implements TestNewsTityService  {

	@Autowired
	protected DAO dao;
	/**
	 * 覆盖默认获取 DAO 方法
	 */
	@Override
	public DAO getDAO() {
		return dao;
	}

	/**
	 * 获取实体
	 * @param id ID
	 * @return 返回实体对象,TestNewsTity
	 **/
	public TestNewsTity getEntity(Integer id) {
		CE ce=new CE();
		ce.and("id=?",id);
		return dao().queryEntity(TestNewsTity.class,ce);
	}


	//此处扩展或覆盖父类方法

}
